package com.atguigu.controller;

import com.atguigu.prop.DataSourceConfigurationProperties;
import com.atguigu.prop.DataSourceProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/hello")
public class HelloController {
    @GetMapping("/h01")
    public String h01(){
        return "HEllO SPRINGBOOT";
    }

    @Autowired
    private DataSourceProperties dataSourceProperties;

    @GetMapping("/h02")
    public Object h02(){

        return dataSourceProperties;
    }


   @Autowired
    private DataSourceConfigurationProperties dataSourceConfigurationProperties;
    @GetMapping("/h03")
    private Object h03(){
        return dataSourceConfigurationProperties;

    }


}
